#include <iostream>
#include <stdlib.h>
#include <stack>

using namespace std;

int main()
{
    stack<int> st;
    for(int i=0;i<30;i++)
    {
        st.push(i);
    }
    cout<<"the size of stack"<<st.size()<<endl;

    while(!st.empty())
    {
        cout<<st.top()<<endl;
        st.pop();
    }
    cout<<"The size of stack is"<<st.size()<<endl;

    system("pause");
    return 0;
}